<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>蒋琼浩</title>
  </head>
  <body>
    <script src="js/echarts.min.js"></script>
    <script src="js/china.js"></script>
    <div id="main" style="width: 600px; height: 400px"></div>
    <script type="text/javascript">
      var myChart = echarts.init(document.getElementById("main"));
      var option = {
        series: [
          {
            type: "graph",
            data: [
              {
                name: "王森然",
                x: 10,
                y: 50,
              },
              {
                name: "葛江鹏",
                x: 90,
                y: 50,
              },
              {
                name: "蒋琼浩",
                x: 50,
                y: 100,
              },
              {
                name: "陈有根",
                x: 90,
                y: 110,
              },
            ],
            symbolSize: 70,
            label: {
              show: true,
            },
            links: [
              {
                source: "王森然",
                target: "葛江鹏",
                label: {
                  show: true,
                  formatter: "一起打游戏",
                  fontSize: 21,
                  color: "green",
                },
              },
              {
                source: "葛江鹏",
                target: "蒋琼浩",
                label: {
                  show: true,
                  formatter: "一起恰饭",
                  fontSize: 21,
                  color: "red",
                },
              },
              {
                source: "蒋琼浩",
                target: "陈有根",
                label: {
                  show: true,
                  formatter: "室友关系",
                  fontSize: 21,
                  color: "ybrown",
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
    </script>
  </body>
</html>
